<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>功能模块</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #f5f7fa;
            min-height: 100vh;
            color: #333;
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
            padding: 0;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            text-align: center;
            position: relative;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 5px;
        }

        .header p {
            font-size: 12px;
            opacity: 0.9;
        }

        .container {
            max-width: 100%;
            margin: 0;
            padding: 0;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin: 12px;
        }

        .feature-card {
            background: white;
            border-radius: 10px;
            padding: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            transition: all 0.3s ease;
            cursor: pointer;
            border: 1px solid #f0f0f0;
            min-height: 140px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }

        .feature-card:active {
            transform: scale(0.98);
        }

        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
        }

        .feature-card.sales::before {
            --gradient-start: #667eea;
            --gradient-end: #764ba2;
        }

        .feature-card.promotion::before {
            --gradient-start: #56ab2f;
            --gradient-end: #a8e6cf;
        }

        .feature-card.procurement::before {
            --gradient-start: #f093fb;
            --gradient-end: #f5576c;
        }

        .feature-card.investment::before {
            --gradient-start: #4facfe;
            --gradient-end: #00f2fe;
        }

        .feature-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            margin-bottom: 8px;
            position: relative;
            z-index: 1;
        }

        .feature-card.sales .feature-icon {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        .feature-card.promotion .feature-icon {
            background: linear-gradient(135deg, #56ab2f, #a8e6cf);
            color: white;
        }

        .feature-card.procurement .feature-icon {
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
        }

        .feature-card.investment .feature-icon {
            background: linear-gradient(135deg, #4facfe, #00f2fe);
            color: white;
        }

        .feature-title {
            font-size: 13px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .feature-description {
            font-size: 10px;
            color: #666;
            line-height: 1.3;
            flex-grow: 1;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .feature-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #f0f0f0;
        }

        .stat-item {
            text-align: center;
            flex: 1;
        }

        .stat-value {
            font-size: 11px;
            font-weight: 700;
            color: #333;
            margin-bottom: 1px;
        }

        .stat-label {
            font-size: 9px;
            color: #666;
        }

        .feature-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 2px 4px;
            border-radius: 6px;
            font-size: 8px;
            font-weight: 500;
            z-index: 1;
        }

        .feature-badge.hot {
            background: #ff6b6b;
            color: white;
        }

        .feature-badge.new {
            background: #4ecdc4;
            color: white;
        }

        .feature-badge.popular {
            background: #45b7d1;
            color: white;
        }

        .quick-actions {
            margin: 12px;
            background: white;
            border-radius: 10px;
            padding: 12px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
            margin-bottom: 10px;
            padding-left: 3px;
        }

        .action-buttons {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
        }

        .action-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }

        .action-btn:active {
            transform: scale(0.98);
        }

        .action-btn.secondary {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }

        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            border-top: 1px solid #e9ecef;
            display: flex;
            justify-content: space-around;
            padding: 8px 0;
            z-index: 1000;
        }

        .nav-item {
            flex: 1;
            text-align: center;
            padding: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .nav-item.active {
            color: #667eea;
        }

        .nav-icon {
            font-size: 18px;
            margin-bottom: 1px;
        }

        .nav-label {
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>功能模块</h1>
        <p>选择您需要的功能服务</p>
    </div>

    <div class="container">
        <!-- 四大功能模块 -->
        <div class="features-grid">
            <div class="feature-card sales" onclick="handleFeatureClick('sales')">
                <div class="feature-badge hot">热门</div>
                <div class="feature-icon">💰</div>
                <div class="feature-title">销售报价</div>
                <div class="feature-description">
                    为您的产品和服务提供专业的报价解决方案，支持多种报价模板和自定义配置，快速生成标准报价单。
                </div>
                <div class="feature-stats">
                    <div class="stat-item">
                        <div class="stat-value">1,234</div>
                        <div class="stat-label">今日报价</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">98%</div>
                        <div class="stat-label">成交率</div>
                    </div>
                </div>
            </div>

            <div class="feature-card promotion" onclick="handleFeatureClick('promotion')">
                <div class="feature-badge new">新品</div>
                <div class="feature-icon">🚀</div>
                <div class="feature-title">新品推送</div>
                <div class="feature-description">
                    向目标客户精准推送新产品信息，智能推荐系统帮助您找到最合适的客户群体，提升产品曝光度。
                </div>
                <div class="feature-stats">
                    <div class="stat-item">
                        <div class="stat-value">567</div>
                        <div class="stat-label">新品数量</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">85%</div>
                        <div class="stat-label">打开率</div>
                    </div>
                </div>
            </div>

            <div class="feature-card procurement" onclick="handleFeatureClick('procurement')">
                <div class="feature-badge popular">推荐</div>
                <div class="feature-icon">📊</div>
                <div class="feature-title">采购比价</div>
                <div class="feature-description">
                    智能比价系统帮助您找到最优供应商，支持多维度对比分析，确保采购成本最优化，质量有保障。
                </div>
                <div class="feature-stats">
                    <div class="stat-item">
                        <div class="stat-value">892</div>
                        <div class="stat-label">供应商</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">15%</div>
                        <div class="stat-label">成本节约</div>
                    </div>
                </div>
            </div>

            <div class="feature-card investment" onclick="handleFeatureClick('investment')">
                <div class="feature-badge hot">招商</div>
                <div class="feature-icon">🏢</div>
                <div class="feature-title">发布招商</div>
                <div class="feature-description">
                    发布招商信息，吸引合作伙伴和投资者，提供专业的招商方案制作和推广服务，扩大商业网络。
                </div>
                <div class="feature-stats">
                    <div class="stat-item">
                        <div class="stat-value">345</div>
                        <div class="stat-label">招商项目</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">72%</div>
                        <div class="stat-label">成功率</div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 快速操作 -->
        <div class="quick-actions">
            <div class="section-title">快速操作</div>
            <div class="action-buttons">
                <button class="action-btn" onclick="handleQuickAction('create')">
                    创建新项目
                </button>
                <button class="action-btn secondary" onclick="handleQuickAction('history')">
                    查看历史记录
                </button>
                <button class="action-btn" onclick="handleQuickAction('analytics')">
                    数据分析
                </button>
                <button class="action-btn secondary" onclick="handleQuickAction('help')">
                    帮助中心
                </button>
            </div>
        </div>
    </div>

    <!-- 底部导航 -->
    <div class="bottom-nav">
        <div class="nav-item" onclick="handleNavClick('home')">
            <div class="nav-icon">🏠</div>
            <div class="nav-label">首页</div>
        </div>
        <div class="nav-item" onclick="handleNavClick('dashboard')">
            <div class="nav-icon">📊</div>
            <div class="nav-label">控制台</div>
        </div>
        <div class="nav-item active" onclick="handleNavClick('features')">
            <div class="nav-icon">🔧</div>
            <div class="nav-label">功能</div>
        </div>
        <div class="nav-item" onclick="handleNavClick('profile')">
            <div class="nav-icon">👤</div>
            <div class="nav-label">我的</div>
        </div>
    </div>

    <script>
        // 功能模块点击处理
        function handleFeatureClick(feature) {
            console.log('Feature clicked:', feature);
            
            switch(feature) {
                case 'sales':
                    alert('销售报价功能开发中...');
                    break;
                case 'promotion':
                    alert('新品推送功能开发中...');
                    break;
                case 'procurement':
                    alert('采购比价功能开发中...');
                    break;
                case 'investment':
                    alert('发布招商功能开发中...');
                    break;
            }
        }

        // 快速操作处理
        function handleQuickAction(action) {
            console.log('Quick action:', action);
            
            switch(action) {
                case 'create':
                    alert('创建新项目功能开发中...');
                    break;
                case 'history':
                    alert('历史记录功能开发中...');
                    break;
                case 'analytics':
                    alert('数据分析功能开发中...');
                    break;
                case 'help':
                    alert('帮助中心功能开发中...');
                    break;
            }
        }

        // 导航处理
        function handleNavClick(nav) {
            console.log('Nav clicked:', nav);
            
            switch(nav) {
                case 'home':
                    window.location.href = 'index.html';
                    break;
                case 'dashboard':
                    window.location.href = 'dashboard.html';
                    break;
                case 'features':
                    // 当前页面，不需要跳转
                    break;
                case 'profile':
                    window.location.href = 'profile.html';
                    break;
            }
        }

        // 页面加载完成后的初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 添加动画效果
            const cards = document.querySelectorAll('.feature-card');
            cards.forEach((card, index) => {
                card.style.opacity = '0';
                card.style.transform = 'translateY(20px)';
                
                setTimeout(() => {
                    card.style.transition = 'all 0.5s ease';
                    card.style.opacity = '1';
                    card.style.transform = 'translateY(0)';
                }, index * 100);
            });
        });
    </script>
    
    <!-- 认证系统 -->
    <script src="auth.js"></script>
    <script src="api.js"></script>
    <script src="router.js"></script>
</body>
</html>